@import "~terriajs-variables";
@import "../../../Sass/common/mixins";

// D3 Axis
.chart {
  :global {
    .base-chart .axis path,
    .base-chart .axis line {
      fill: none;
      stroke: none; // Hide the axes if the chart is outside the chart panel.
      stroke-width: 1px;
      shape-rendering: crispEdges;
    }

    .base-chart .selection circle {
      fill: white;
      stroke: white;
      stroke-width: 1;
      opacity: 0.65;
    }

    .base-chart .selection line {
      stroke: white;
      opacity: 0.65;
      stroke-width: 1;
    }

    .base-chart .plot-area {
      fill: none;
    }

    .base-chart path.line {
      stroke-width: 2;
    }

    .base-chart-title {
      left: 0;
      right: 0;
      margin: 0 auto;
      position: absolute;
      text-align: center;
      overflow: hidden;
      height: 18px;
    }

    .base-chart-title .color {
      display: inline-block;
      width: 10px;
      height: 10px;
      margin: 2px;
    }

    .base-chart-title .name {
      margin-right: 7px;
      font-family: monospace;
      font-size: 100%;
      vertical-align: top;
    }
  }
}

.tool-tip {
  color: $text-light;
  background-color: $chart-darker;
  padding: 5px 10px;
  font-family: monospace;

  :global {
    table {
      border-collapse: collapse;
      border-spacing: 0;
      max-width: 100%;
      width: 100%;
    }

    .color {
      width: 16px;
      height: 2px;
      display: inline-block;
      margin-right: 10px;
      margin-left: -5px;
    }

    tr:nth-child(2) {
      border-top: 1px solid rgba($text-light, 0.2);
    }

    .categoryTable {
      tr:nth-child(2) {
        border-top: none;
      }
    }

    .dataRow {
      .dataIcon {
        max-width: 20px;
        span {
          vertical-align: middle;
        }
      }

      .dataVal {
        padding: 3px 1px 3px 0px;
      }
    }

    .value {
      min-width: 80px;
      text-align: right;
    }

    p {
      margin: 1px 0;
    }

    .x-value {
      font-weight: 700;
    }

    .category-name {
      margin-top: 5px;
      font-weight: 700;
    }
  }
}

.concepts {
  display: flex;
}
.conceptsList {
  margin: 0;
  list-style: none;
  ul {
    display: flex;

    li {
      background: rgba(255, 255, 255, 0.2);
      padding: 0px 10px;
      border-radius: 2px;
      display: block;
      margin: 0 10px 5px 0;
      flex-basis: 48%;
    }
  }
}
